<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>个人中心</title>
<?php $srconfig = include(getcwd().'/Project/Common/Conf/srconfig.php'); ?>
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
<script src="__PUBLIC__/js/jquery-2.1.1.min.js"></script>
<link href="__PUBLIC__/Weixin/css/index.css?v={:rand(0,99)}" rel="stylesheet" type="text/css">
<link href="__PUBLIC__/Weixin/css/head.css?v={:rand(0,99)}" rel="stylesheet" type="text/css">
   <link href="/ge/css/style.css" type="text/css" rel="stylesheet" />
<style></style>
<script>
$(document).ready(function () { 
   $('.chongzhi').click(function(){
	   $.post("{:U('Ajax/getchongnum')}",{},function(res){
		   if(res.code==1){
	          var djine = parseFloat($('input[name="djine"]').val());
	          if(!djine){
	            djine = parseFloat($('select[name="djine"]').val());
	          }
	          if(isNaN(djine) || djine < 0){
			     $('.msgbox .txt').text('请输入金额！');
			     $('.msgbox').show();
			     return false;
	          }
	          location.href = "{:U('Chongzhi/chong?ctype=3&djine=')}"+djine;
		   } else {
			     $('.msgbox .txt').text('今天充值上限，请明天再来！');
			     $('.msgbox').show();
			     return false;
		   }
	   },'json');
   });
   //checkin-balance
   $('#tixian').click(function(){
       $('#tixian').unbind();
	   $(this).unbind();
       //alert('系统维护！请稍侯再试。'); return;
    //==alert('ok');
       <?php if( $userzhanghu['uqianchong'] < intval($srconfig['lowest_withdraw_limit'])*100){ ?>
		    $('.msgbox .txt').text('最少<?php echo $srconfig['lowest_withdraw_limit']; ?>元才能提现！');
		    $('.msgbox').show();
			return false;
       <?php } else { ?>
	   $(this).unbind();
//	   var djine = parseFloat($('#yue').val());
//	   //alert(djine);
//	   if(!djine){
//	       
//	   }
	   //alert(djine);return;
	   //if(djine < 1){
//		    $('.msgbox .txt').text('最少一元才能提现哦！');
//		    $('.msgbox').show();
//			return false;
//	   }
	   //alert('ajax');
	   //alert(djine);return;
	   $.post("{:U('Ajax/getfaqiancishu')}",{},function(res){
	       //alert(JSON.stringify(res));
		   if(res.cishu < 99){
			   // $.post("{:U('Tixian/fastpay')}",{
//			        jine: parseFloat($('#yue').val())
//			    },function(jes){
//			        //alert(jes);
//			        $('#ccddeeff').html(jes);
//			    }, 'text');
	       //alert(JSON.stringify({jine: parseFloat($('#yue').val())}));
			    $.post("{:U('Tixian/fastpay')}",{jine: parseFloat($('#yue').val())},function(jes){
	       //alert(JSON.stringify(jes));
				    if(jes.code == 1){
			           $('.msgbox .txt').text('提现成功！');
		               $('.msgbox').show();
					   $('#yue').text(0);
					}
				    if(jes.code == 2){
			           $('.msgbox .txt').text('系统繁忙，稍后再试！');
		               $('.msgbox').show();
					}
				    if(jes.code == 3){
			           $('.msgbox .txt').text('最少一元才能提现！');
		               $('.msgbox').show();
					}	
				    if(jes.code == 4){
			           $('.msgbox .txt').text('提现申请已提交，请等待工作人员审核');
		               $('.msgbox').show();
					   $('#yue').text(0);
					   setTimeout(function(){
					   	var host = window.location.host;
					   },2000);
					   
					}
				},'json');
		   } else {
			    $('.msgbox .txt').text('今天超过上限，请明天再来！');
		        $('.msgbox').show();
		   }
	   },'json');   
       <?php } ?>
   });
   
   
    $('#checkin-draw').click(function(){
        //alert('ok');
    	$(this).unbind();
    	//var djine = parseFloat($('#checkin-balance').text());
//    	if(!djine){
//    	    djine = parseFloat($('#checkin-balance').val());
//    	}
//    	if(djine < 1){
//    		$('.msgbox .txt').text('最少一元才能提现！');
//    		$('.msgbox').show();
//    		return false;
//    	}
    	$.post("{:U('checkin/checkinDrawCount')}",{},function(res){
            //alert(JSON.stringify(res));
    		if(res.cishu < 99){
    			$.post("{:U('checkin/checkinDraw')}",{},function(jes){
            //alert(JSON.stringify(jes));
    				if(jes.code == 1){
    					$('.msgbox .txt').text('提现成功！');
    					$('.msgbox').show();
    					$('#checkin-balance').text(0);
    				}
    				if(jes.code == 2){
    					$('.msgbox .txt').text('系统繁忙，稍后再试！');
    					$('.msgbox').show();
    				}
    				if(jes.code == 3){
    					$('.msgbox .txt').text('最少一元才能提现！');
    					$('.msgbox').show();
    				}	
    			},'json');
    		} else {
    			$('.msgbox .txt').text('今天超过上限，请明天再来！');
    			$('.msgbox').show();
    		}
    	},'json');   
    });
});
</script>

</head>
<body>
  
    <body class="main_background">
        <div class="box padding_bottom02">
            <div class="top_02">
                <img src="/ge/picture/top.png" />
            </div>
            <div class="guang">
                <img id="img" src="/ge/picture/guang.png" />
            </div>
            <div class="center">
                <div class="c_b background_white">
                    <h3 class="title font_red" style="margin-bottom: 0;">
                        ID : {$Think.session.userid}
                    </h3>
                    <h3 class="title font_red">
                        下级代理 : {$jiazunum|intval}人
                    </h3>
                
                </div>
                <div class="c_b background_white b_r cb_p">
                    <ul class="personal_box">
                        <li>
                          <form action="/codepay/index.php" method="post">
                            <input type="hidden" name="uid" value="{$Think.session.userid}"> 
                            <input type="hidden" name="uickname" value="{$uickname}"> 
                          
                    
                            <input id="yue" name="money" value="{$money}" type="hidden">
                     
                         <li><span>余 额：</span><span class="font_red"> ￥{$money}</span><a id="tixian" href="javascript:" style="text-align: center; display:none;background-color: #FF0000 !important;" class="info bg_orange">全额提现</a></li> 
						<li>
                            <a href="{:U('Index/daili')}" class="r_aroow">
                              
                             
                                <span class="bg01">
                                    代理二维码
                                </span>
                            </a>
                        </li>
                        <li>
                            <a href="{:U('Ucenter/hblist')}" class="r_aroow">
                                <span class="bg02">
                                    中奖记录
                                </span>
                            </a>
                        </li>
                        <li>
                            <a href="{:U('Ucenter/chonglist')}" class="r_aroow">
                                <span class="bg03">
                                    充值记录
                                </span>
                            </a>
                        </li>
                        <li>
                            <a href="{:U('Index/yongjin')}" class="r_aroow">
                                <span class="bg04">
                                    佣金记录
                                </span>
                                <a href="my_commission.do" class="r_aroow">
                                </a>
                        </li>
						 <li class="no_border">
                            <a href="{:U('Index/dailixq')}" class="r_aroow">
                                <span class="bg05">
                                  
                                   代理佣金说明
                                </span>
                                <a href="contact.do" class="r_aroow">
                                </a>
                        </li
                    ></ul>
                </div>
            </div>
        </div>


 
<include file="Index/meno" />
</body>
</html>